package com.ge.med.cchelper.util;

import java.util.HashMap;

import org.eclipse.core.resources.IProject;

import com.ge.med.cchelper.bean.CSession;


public class ReourceHelper {
	
	private static IProject project;

	
	public static IProject getProject() {
		return project;
	}

	public static void setProject(IProject project) {
		ReourceHelper.project = project;
	}

	private HashMap<String, CSession> map = new HashMap<String,CSession>();
	
	private static ReourceHelper resource;
	
	public static ReourceHelper getResource(){
		if(resource==null){
			resource= new ReourceHelper();
		}
		return resource;
	}
	
	public void addSession(String projectId,CSession object){
		map.put(projectId, object);
		//LogUtil.out("add resource:"+projectId+"["+object+"]");
	}
	
	public CSession getSession(String projectId){
		return map.get(projectId);
	}
	
	public void removeSession(String projectId){
		map.remove(projectId);
	}

}
